package models

import "time"

func (a *AdminGroup) TableName() string {
	return "admin_group"
}

//权限组
type AdminGroup struct{
	Id	uint
	Name string `orm:"size(60)"description:"组名"`
	Rules string `orm:"type(text)"description:"规则ID"`
	Status uint8 `orm:"default(1)" description:"状态1=正常2=禁用"`
	Remark string `orm:"size(255);default()"description:"备注"`
	UpdatedAt time.Time `orm:"null;auto_now;type(datetime)"description:"更新时间"`
	CreatedAt time.Time `orm:"auto_now_add;type(datetime)"description:"创建时间"`
	AdminUser []*AdminUser `orm:"rel(m2m)"`
}

//权限列表
type TreeGroupRule struct {
	*AdminGroup
	Children []* AdminAuthRule
}



